<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateJournalsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        DB::unprepared('
            CREATE TABLE `journals` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name_full` varchar(255) DEFAULT NULL,
  `name_full_en` varchar(255) DEFAULT NULL,
  `name_short` varchar(255) DEFAULT NULL,
  `name_short_en` varchar(255) DEFAULT NULL,
  `journal_url` varchar(255) DEFAULT NULL,
  `issn` varchar(50) DEFAULT NULL,
  `eissn` varchar(50) DEFAULT NULL,
  `cn` varchar(255) DEFAULT NULL,
  `journal_league_url` varchar(255) DEFAULT NULL,
  `weibo_url` varchar(255) DEFAULT NULL,
  `order` tinyint(1) DEFAULT NULL,
  `attr` int(10) DEFAULT NULL,
  `language` int(10) DEFAULT NULL,
  `is_oa` tinyint(1) DEFAULT NULL,
  `database` int(10) DEFAULT NULL,
  `font_color` varchar(20) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `email_name` varchar(20) DEFAULT NULL,
  `email_password` varchar(20) DEFAULT NULL,
  `smtp` varchar(255) DEFAULT NULL,
  `port` int(10) DEFAULT NULL,
  `encode` varchar(10) DEFAULT NULL,
  `is_ssl` tinyint(1) NOT NULL DEFAULT "0",
  `ssl_port` varchar(255) DEFAULT NULL,
  `is_validate` tinyint(1) NOT NULL DEFAULT "0",
  `is_free` tinyint(1) NOT NULL DEFAULT "0",
  `is_split` tinyint(1) NOT NULL DEFAULT "0",
  `is_crossref` tinyint(1) DEFAULT "0",
  `toc` int(10) DEFAULT "0",
  `cover` varchar(255) DEFAULT NULL,
  `cover_en` varchar(255) DEFAULT NULL,
  `type` int(10) DEFAULT NULL,
  `is_editor` tinyint(1) NOT NULL DEFAULT "0",
  `cdkey` varchar(255) DEFAULT NULL,
  `copy_right` varchar(255) DEFAULT NULL,
  `address` varchar(255) DEFAULT NULL,
  `post_code` int(10) DEFAULT NULL,
  `telephone` int(20) DEFAULT NULL,
  `fax` int(20) DEFAULT NULL,
  `email_web` varchar(255) DEFAULT NULL,
  `icp` int(20) DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8
            ');

    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('journals');
    }
}
